<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'list.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  </head>
  
  <body>
  		<h1>用户列表</h1>
  <a href="saveTable.jsp">添加</a>
  <form action="findTableById.action" method="post">
	  <input type="text" name="table.id">
	  <input type="submit" value="ID查询">
  </form>
  <table border="1">
	  <tr>
			<td>id</td>
			<td>姓名</td>
			<td>密码</td>
			<td>修改</td>
			<td>删除</td>
		</tr>
		<c:forEach items="${list}" var="table" >
		<tr>
			<td>${table.id}</td>
			<td>${table.username}</td>
			<td>${table.password}</td>
			<td><a href="update.jsp?id=${table.id}&username=${table.username}&password=${table.password}">修改</a></td>
			<td><a href="deleteTable.action?table.id=${table.id}">删除</a></td>
		</tr>
	</c:forEach>
    </table>
  
  </body>
</html>
















